home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0758 / setup.arv / COLLECT.TEM < prev    next >
Encoding:
Text File  |  1997-04-10  |  1.3 KB  |  46 lines

  1. # Collector Title 
  2.         $TITLE="Catalog Maker Order Collector";
  3. ###############################
  4. # END OF CHANGEABLE OPTIONS   #
  5. ###############################
  6.  
  7. ###############################
  8. # END OF CHANGEABLE OPTIONS   #
  9. ###############################
  10.  
  11. # START MAIN PROGRAM 
  12. # ------------------
  13.  
  14. if ($ENV{'GATEWAY_INTERFACE'} ne '') {
  15.         $CGIScript = 1;
  16.         print "Content-Type: text/html\n\n";
  17.         print "<html><head><title>$TITLE</title></head><body>";
  18.         print "<h3>Collected order forms </h2>";
  19. } else {
  20.         $CGIScript = 0;
  21.         print "Collected Order Forms\n\n";
  22.  
  23. }
  24.  
  25. while ($fileName = glob("*.frm")) {
  26.         if ($CGIScript == 1) {
  27.                 print "<hr>$fileName<hr>";
  28.         } else {
  29.                 print "\n----\n$fileName\n\n";
  30.         }
  31.         open(INPUT, "<$fileName");
  32.         undef $/; # Read in the entire file 
  33.         $data = <INPUT>;
  34.         if ($CGIScript == 1) {
  35.                 $data = s/\n/<br>/g; # replace newlines with <br>
  36.         }
  37.         print $data;
  38.         unlink($fileName);
  39. } # for every session data file available.
  40. if (CGIScript == 1) {
  41.         print "<hr>Created by the HyperAct Catalog Maker</body></html>";
  42. } else {
  43.         print "\n----\nCreate by the HyperAct Catalog Maker\n";
  44. }
  45.  
  46.